<template>
  <div>
    two
    <button @click="add">sa</button>
    {{ $store.state.count }}
    <router-link to="/child1">as</router-link>
    <router-view></router-view>
  </div>
</template>

<script>
import { useStore } from "vuex";
export default {
  setup() {
    const store = useStore();
    return {
      count: store.state.count,
      add() {
        store.commit("add");
      },
    };
  },
};
</script>

<style></style>
